home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectPlay / VoiceClientServer / Common / voiceclientserver.h
Encoding:
C/C++ Source or Header  |  2001-10-31  |  2.0 KB  |  64 lines

  1. //----------------------------------------------------------------------------
  2. // File: VoiceClientServer.h
  3. //
  4. // Desc: see voiceclient.cpp
  5. //
  6. // Copyright (c) 1999-2001 Microsoft Corp. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10.  
  11.  
  12. //-----------------------------------------------------------------------------
  13. // Defines, and constants
  14. //-----------------------------------------------------------------------------
  15. #define DPLAY_SAMPLE_KEY        TEXT("Software\\Microsoft\\DirectX DirectPlay Samples")
  16. #define MAX_PLAYER_NAME         14
  17. #define WM_APP_DISPLAY_PLAYERS  (WM_APP + 0)
  18. #define WM_APP_UPDATE_STATS     (WM_APP + 1)
  19.  
  20. // This GUID allows DirectPlay to find other instances of the same game on
  21. // the network.  So it must be unique for every game, and the same for 
  22. // every instance of that game.  // {AD8EF550-EB5D-49b8-9C13-DC6CCDA33FC5}
  23. GUID g_guidApp = { 0xad8ef550, 0xeb5d, 0x49b8, { 0x9c, 0x13, 0xdc, 0x6c, 0xcd, 0xa3, 0x3f, 0xc5 } };
  24.  
  25.  
  26.  
  27.  
  28. //-----------------------------------------------------------------------------
  29. // App specific DirectPlay messages and structures 
  30. //-----------------------------------------------------------------------------
  31. #define GAME_MSGID_CREATE_PLAYER    1
  32. #define GAME_MSGID_DESTROY_PLAYER   2
  33. #define GAME_MSGID_SET_ID           3
  34.  
  35. // Change compiler pack alignment to be BYTE aligned, and pop the current value
  36. #pragma pack( push, 1 )
  37.  
  38. struct GAMEMSG_GENERIC
  39. {
  40.     DWORD dwType;
  41. };
  42.  
  43. struct GAMEMSG_SET_ID : public GAMEMSG_GENERIC
  44. {
  45.     DWORD dpnidPlayer;                 // dpnid of the player 
  46. };
  47.  
  48. struct GAMEMSG_CREATE_PLAYER : public GAMEMSG_GENERIC
  49. {
  50.     DWORD dpnidPlayer;                          // dpnid of the player created
  51.     TCHAR strPlayerName[MAX_PLAYER_NAME];   // name of the player created
  52. };
  53.  
  54. struct GAMEMSG_DESTROY_PLAYER : public GAMEMSG_GENERIC
  55. {
  56.     DWORD dpnidPlayer;                 // dpnid of the player destroyed
  57. };
  58.  
  59. // Pop the old pack alignment
  60. #pragma pack( pop )
  61.  
  62.  
  63.  
  64.